package server.test

import org.scalatest._
import server.world._
import server.world.action._
import server.world.item._
import server.world.character._
import server.world.map._

class IronBirdSuite extends Suite with OneInstancePerTest{
 TurnProcessor.flush()
 val locmap = CTE.makeTestMap(20, 20)
 val npc1 = new NPC(locmap.getTile(2, 2))
 val npc2 = new NPC(locmap.getTile(6, 8))
 npc1.spawn()
 npc2.spawn()
 AI.addNPC(npc1)
 AI.addNPC(npc2)
 
 def testBerserkerNPCs(){
   assert(npc1.isAlive() & npc2.isAlive())
   assert(npc1.isabletoAct() & npc2.isabletoAct)
   assert(!npc1.findEnemy().isEmpty)
   CTE.passTurns(1000)
   assert(npc1.hp != npc1.getMaxHP() & npc2.hp != npc2.getMaxHP())
 }
 
}